A Loopless Gray Code for Minimal Signed-Binary Representations

نویسندگان

  • Gurmeet Singh Manku
  • Joe Sawada
چکیده

A string . . . a2a1a0 over the alphabet {−1, 0, 1} is said to be a minimal signed-binary representation of an integer n if n = k≥0 ak2 k and the number of non-zero digits is minimal. We present a loopless (and hence a Gray code) algorithm for generating all minimal signed binary representations of a given integer n.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Simple Gray Code to List All Minimal Signed Binary Representations

Abstract. A signed binary representation (SBR) of an integer N is a string ab · · · a2a1a0 over the alphabet {−1, 0, 1} such that N = ∑b i=0 ai2 i. An SBR of an integer N is said to be minimal if the number of nonzero digits is minimum. In this paper, we describe a simple 3-close Gray code for listing all minimal SBRs of an integer N . The algorithm is implemented to run in constant amortized t...

متن کامل

Fixed-Density Necklaces and Lyndon Words in Cool-lex Order

This paper creates a simple Gray code for fixed-density binary necklaces and Lyndon words. The Gray code is simultaneously a left-shift Gray code and a 2-transposition Gray code and is cyclic with these properties. It also has the advantage of using canonical representations (lexicographically minimum rotations) yielding the first known Gray code for Lyndon words ordered by density. This work s...

متن کامل

Logic for Gray Code Computation

Gray code is a well-known binary number system such that neighboring values differ in one digit only. Tsuiki (2002) has introduced Gray code to the field of real number computation. He assigns to each number a unique 1⊥-sequence, i.e., a (possibly infinite) sequence of {−1, 1,⊥} such that at most one copy of ⊥ (meaning undefinedness) is contained in the sequence not as the last character. In th...

متن کامل

Loopless Generation of Schröder Trees

The well-known Schröder numbers have appeared in different combinatorial contexts, including Schröder trees and well-weighted binary trees. The only loopless algorithm for generating Schröder trees actually generated representations for their well-weighted binary tree counterparts. This paper presents the first loopless algorithms for directly generating Schröder tree representations. They use ...

متن کامل

The Intrepid Waitress Problem

An intrepid waitress leaves a restaurant kitchen with a stack of n different sized pancakes. Before she reaches her patrons, she wishes to iterate through all possible stack orderings using only a spatula and performing flips of various sizes. But is this possible? This problem corresponds to constructing a Hamilton path in the “pancake network”, or equivalently, to find a Gray code for permuta...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005